package lianxiti;

public class Person {
    private int age;
    public void setAge(int age){

        if (age < 0) {
            System.out.println("年龄不能为负数");
            } else {
            this.age = age;
        }
    }
}
